# coding:utf-8

from web.manager.log_manager import LogManager
from web.task.base_task import BaseTask

Logger = LogManager.get_logger(__name__)


class BaostockBondIndexTask(BaseTask):
    """
    债券指数任务
    """

    def baostock_download_bond_index(self):
        """
        下载债券指数数据
        """

        self.baostock_bond_index_service.baostock_download_bond_index()

    def paint_all_broken_line_graph(self):
        """
        创建所有指数的折线图
        """

        self.baostock_bond_index_service.paint_all_broken_line_graph()

    def paint_shanghai_treasury_broken_line_graph(self):
        """
        创建上证国债指数的折线图
        """

        self.baostock_bond_index_service.paint_shanghai_treasury_broken_line_graph()
